import autokeras
import process_data_func as process_data
import model_1_func
import kerastuner

data,label,data_test,label_test=model_1_func.getData()

m=autokeras.StructuredDataClassifier(
    column_names=None,
    column_types=None,
    num_classes=2,
    multi_label=False,
    loss='binary_crossentropy',
    metrics=model_1_func.f1,
    directory=None,
    objective=kerastuner.Objective("val_f1", direction="max"),
    overwrite=True,
    seed=None
)

m.fit(x=data, y=label, validation_data=(data_test,label_test))

m.export_keras_model('NASmodel.h5')
